package com.botarena.server.servlets.http;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.botarena.server.services.BattleScheduler;

/**
 * HTTP access for CRON.
 */
public class ScheduleNextBattlesServlet extends HttpServlet {

	private static final long serialVersionUID = 2555991631037962777L;

	@Override
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		BattleScheduler.scheduleNextBattle();
		response.getOutputStream().println("OK");
	}
}